package com.ordertracker.entity.document;

import java.math.BigDecimal;
import java.util.Date;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.ordertracker.constant.DocumentType;
import com.ordertracker.entity.Client;
import com.ordertracker.entity.Organization;
import com.ordertracker.entity.VersionedEntity;


@XmlRootElement
public class PaymentOrder extends VersionedEntity{

	private static final long serialVersionUID = -6549382395803643286L;
	private String externalId;
	private Date date;
	private String num;
	private Organization organization;
	private Client client;
	private String comments;
	private DocumentType documentType;
	private Currency currency;
	private BigDecimal currencyRate;
	private BigDecimal sum;
	
	public PaymentOrder(){
	}
	
	public PaymentOrder(Date date, String num, Organization organization,
			Client client, String comments, DocumentType documentType,
			Currency currency, BigDecimal currencyRate, BigDecimal sum) {
		super();
		this.date = date;
		this.num = num;
		this.organization = organization;
		this.client = client;
		this.comments = comments;
		this.documentType = documentType;
		this.currency = currency;
		this.currencyRate = currencyRate;
		this.sum = sum;
	}

	
	@XmlElement
	public String getExternalId() {
		return externalId;
	}

	public void setExternalId(String externalId) {
		this.externalId = externalId;
	}

	@XmlElement
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@XmlElement
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	@XmlElement
	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}
	
	@XmlElement
	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	
	@XmlElement
	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}
	
	@XmlElement
	public DocumentType getDocumentType() {
		return documentType;
	}

	public void setDocumentType(DocumentType documentType) {
		this.documentType = documentType;
	}
	
	@XmlElement
	public BigDecimal getCurrencyRate() {
		return currencyRate;
	}

	public void setCurrencyRate(BigDecimal currencyRate) {
		this.currencyRate = currencyRate;
	}
	
	@XmlElement
	public BigDecimal getSum() {
		return sum;
	}

	public void setSum(BigDecimal sum) {
		this.sum = sum;
	}
	
	@XmlElement
	public Currency getCurrency() {
		return currency;
	}

	public void setCurrency(Currency currency) {
		this.currency = currency;
	}

	@Override
	public String toString() {
		return "PaymentOrder [date=" + date + ", num=" + num
				+ ", organization=" + organization + ", client=" + client
				+ ", comments=" + comments + ", documentType=" + documentType
				+ ", currency=" + currency + ", currencyRate=" + currencyRate
				+ ", sum=" + sum + "]";
	}

}
